<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="../../head.jsp"%>
<script type="text/javascript">
<!--
	function _submit() {
		$.post("${base}/shop_addShop", 
			$('#_applyForm').serialize(), 
			function(response) {
				if (response && response.success) {
					alert(response.msg);
				} else {
					alert(response.msg);
				}
				_clear();
		}, "json");
	}
	
	function _clear() {
		$("input[type='text'],textarea").each(function() {
			$(this).val("");
		});
	}
//-->
</script>
	<noscript>
		<div class="alert alert-block span10">
			<h4 class="alert-heading">Warning!</h4>
			<p>You need to have <a href="http://en.wikipedia.org/wiki/JavaScript" target="_blank">JavaScript</a> enabled to use this site.</p>
		</div>
	</noscript>
	
<div id="content" class="span10">
	<!-- content starts -->
		<div class="row-fluid sortable">
			<div class="box span12">
				<div class="box-header well" data-original-title>
					<h2><i class="icon-edit"></i> 店铺注册</h2>
					<div class="box-icon">
						<a href="#" class="btn btn-setting btn-round"><i class="icon-cog"></i></a>
						<a href="#" class="btn btn-minimize btn-round"><i class="icon-chevron-up"></i></a>
						<a href="#" class="btn btn-close btn-round"><i class="icon-remove"></i></a>
					</div>
				</div>
				<div class="box-content">
					<form  id="_applyForm" method="post" class="form-horizontal">
					<input type="hidden" id="addressNAME" name="placename" />
					<input type="hidden" id="addressID" name="addressid" />
					<input type="hidden" id="parentid" value="-1" />
					  <fieldset>
						<div class="control-group">
						  <label class="control-label" for="typeahead">用户姓名： </label>
						  <div class="controls">
							${user.name }
						  </div>
						</div>
						<div class="control-group">
						  <label class="control-label" for="date01">商家名称：</label>
						  <div class="controls">
							<input type="text" id="m_shopname" name="shopname" class="text-input" />
						  </div>
						</div>

						<div class="control-group">
						  <label class="control-label" for="fileInput">联系人：</label>
						  	<div class="controls">
								<input type="text" id="m_linkman" name="linkman" class="text-input" />
					  		</div>
						</div> 
						<div class="control-group">
						  <label class="control-label" for="fileInput">身份证：</label>
						  	<div class="controls">
								<input type="text" id="m_idcard" name="idcard" class="text-input" />
					  		</div>
						</div>          
						<div class="control-group">
						  <label class="control-label" for="fileInput">联系人电话：</label>
						  <div class="controls">
							<input type="text" id="m_linkmanphone" name="linkmanphone" class="text-input" />
						  </div>
						</div> 
						
						<div class="control-group">
						  <label class="control-label" for="fileInput">商家地址：</label>
						  <div class="controls">
							<input type="text" id="m_shopaddress" name="shopaddress" class="text-input" />
						  </div>
						</div>
						
						<div class="control-group">
						  <label class="control-label" for="fileInput">关键字：</label>
						  <div class="controls">
							<input type="text" id="m_keyworde" name="keyworde" class="text-input" />
						  </div>
						</div>  
						<div class="control-group">
						  <label class="control-label" for="textarea2">商家介绍 ：</label>
						  <div class="controls">
							<textarea class="cleditor" id="m_shopdesc" name="shopdesc" rows="3"></textarea>
						  </div>
						</div>
						<div class="form-actions">
						  <button class="btn btn-primary" onclick="javascript:_submit();">保存</button>
						  <button type="reset" class="btn">清空</button>
						</div>
					  </fieldset>
					</form>   
				</div>
			</div><!--/span-->
		</div><!--/row-->
<div><!-- span10 -->
<%@ include file="../../bottom.jsp" %>